<template>
    <div id="notice">
        <div class="notice-type" v-for="(item, index) in noticelist" @click="onClick(index)">
            <group>
                <cell :title="item.title" :value="item.updateTime" ></cell>
                <img src="../../../static/img/biaoqian-zhi@2x.png" />
            </group>
        </div>
    </div>
</template>
<script>
import { Cell, Group } from 'vux'
import api from '../../api'
import utils from '../../utils'
export default {
  data () {
    return {
      noticelist: []
    }
  },
  components: {
    Cell,
    Group
  },
  created () {
    window.document.title = '公告'
    api.notice().then(res => {
      console.log(res)
      this.noticelist = res.data.list
    })
    utils.jssdkwx(api, this.$wechat, this.$store)
  },
  methods: {
    onClick (index) {
      window.location.href = '/notice/detail?shareParam=share&notice_id=' + this.noticelist[index].id
    }
  }
}
</script>
